package com.kiki.song_category.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kiki.song_category.mapper.SongCategoryMapper;
import com.kiki.song_category.domain.SongCategory;
import com.kiki.song_category.service.ISongCategoryService;

/**
 * 音乐分类Service业务层处理
 * 
 * @author 林志毅
 * @date 2025-05-01
 */
@Service
public class SongCategoryServiceImpl implements ISongCategoryService 
{
    @Autowired
    private SongCategoryMapper songCategoryMapper;

    /**
     * 查询音乐分类
     * 
     * @param id 音乐分类主键
     * @return 音乐分类
     */
    @Override
    public SongCategory selectSongCategoryById(Long id)
    {
        return songCategoryMapper.selectSongCategoryById(id);
    }

    /**
     * 查询音乐分类列表
     * 
     * @param songCategory 音乐分类
     * @return 音乐分类
     */
    @Override
    public List<SongCategory> selectSongCategoryList(SongCategory songCategory)
    {
        return songCategoryMapper.selectSongCategoryList(songCategory);
    }

    /**
     * 新增音乐分类
     * 
     * @param songCategory 音乐分类
     * @return 结果
     */
    @Override
    public int insertSongCategory(SongCategory songCategory)
    {
        return songCategoryMapper.insertSongCategory(songCategory);
    }

    /**
     * 修改音乐分类
     * 
     * @param songCategory 音乐分类
     * @return 结果
     */
    @Override
    public int updateSongCategory(SongCategory songCategory)
    {
        return songCategoryMapper.updateSongCategory(songCategory);
    }

    /**
     * 批量删除音乐分类
     * 
     * @param ids 需要删除的音乐分类主键
     * @return 结果
     */
    @Override
    public int deleteSongCategoryByIds(Long[] ids)
    {
        return songCategoryMapper.deleteSongCategoryByIds(ids);
    }

    /**
     * 删除音乐分类信息
     * 
     * @param id 音乐分类主键
     * @return 结果
     */
    @Override
    public int deleteSongCategoryById(Long id)
    {
        return songCategoryMapper.deleteSongCategoryById(id);
    }

    @Override
    public List<SongCategory> getSongTypeList() {
        return songCategoryMapper.getSongTypeList();
    }
}
